package com.boluo.custom.service.impl;

import java.util.List;
import com.boluo.common.utils.DateUtils;
import com.boluo.common.utils.SecurityUtils;
import com.boluo.custom.dto.CusInformationDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.boluo.custom.mapper.CusInformationMapper;
import com.boluo.custom.domain.CusInformation;
import com.boluo.custom.service.ICusInformationService;

/**
 * 项目一测试Service业务层处理
 * 
 * @author boluio
 * @date 2023-04-22
 */
@Service
public class CusInformationServiceImpl implements ICusInformationService 
{
    @Autowired
    private CusInformationMapper cusInformationMapper;

    /**
     * 查询项目一测试
     * 
     * @param cusId 项目一测试主键
     * @return 项目一测试
     */
    @Override
    public CusInformation selectCusInformationByCusId(Long cusId)
    {
        return cusInformationMapper.selectCusInformationByCusId(cusId);
    }

    /**
     * 查询项目一测试列表
     * 
     * @param cusInformationDTO 项目一测试
     * @return 项目一测试
     */
    @Override
    public List<CusInformation> selectCusInformationList(CusInformationDTO cusInformationDTO)
    {
        return cusInformationMapper.selectCusInformationList(cusInformationDTO);
    }

    /**
     * 新增项目一测试
     * 
     * @param cusInformation 项目一测试
     * @return 结果
     */
    @Override
    public int insertCusInformation(CusInformation cusInformation)
    {
        cusInformation.setUserId(SecurityUtils.getUserId());
        cusInformation.setCreateTime(DateUtils.getNowDate());
        return cusInformationMapper.insertCusInformation(cusInformation);
    }

    /**
     * 修改项目一测试
     * 
     * @param cusInformation 项目一测试
     * @return 结果
     */
    @Override
    public int updateCusInformation(CusInformation cusInformation)
    {
        return cusInformationMapper.updateCusInformation(cusInformation);
    }

    /**
     * 批量删除项目一测试
     * 
     * @param cusIds 需要删除的项目一测试主键
     * @return 结果
     */
    @Override
    public int deleteCusInformationByCusIds(Long[] cusIds)
    {
        return cusInformationMapper.deleteCusInformationByCusIds(cusIds);
    }

    /**
     * 删除项目一测试信息
     * 
     * @param cusId 项目一测试主键
     * @return 结果
     */
    @Override
    public int deleteCusInformationByCusId(Long cusId)
    {
        return cusInformationMapper.deleteCusInformationByCusId(cusId);
    }
}
